package com.yunxi.service.dubboService.impl.vehicle;

import com.yunxi.model.vehicle.VehicleConfig;
import com.yunxi.service.localService.vehicle.VehicleConfigService;
import com.yunxi.vehicle.pojo.VehicleConfigFeatureVO;
import com.yunxi.vehicle.pojo.VehicleConfigInOutColorQueryReqVO;
import com.yunxi.vehicle.pojo.VehicleConfigInOutColorQueryRespVO;
import com.yunxi.vehicle.pojo.VehicleConfigVO;
import com.yunxi.vehicle.service.VehicleConfigDubboService;
import java.util.List;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

public class VehicleConfigDubboServiceImpl implements VehicleConfigDubboService {

    @Autowired
    @Qualifier("vehicleConfigServiceImpl")
    VehicleConfigService configService;

    /**
     * 根据特征族编码查询特征值集合
     * @param familyCode 特征族
     * @return 特征值集合
     */
    @Override
    public List<VehicleConfigFeatureVO> findConfigFeatureByFamilyCode(String familyCode) {
        return configService.findConfigFeatureByFamilyCode(familyCode);
    }

    @Override
    public List<VehicleConfigInOutColorQueryRespVO> queryVehicleConfigInColorByApp(VehicleConfigInOutColorQueryReqVO vo) {
        return configService.queryVehicleConfigInColorByApp(vo);
    }

    @Override
    public List<VehicleConfigInOutColorQueryRespVO> queryVehicleConfigOutColorByApp(VehicleConfigInOutColorQueryReqVO vo) {
        return configService.queryVehicleConfigOutColorByApp(vo);
    }

    @Override
    public void saveOrUpdate(VehicleConfigVO vehicleConfigvo) {
        VehicleConfig vc = new VehicleConfig();
        BeanUtils.copyProperties(vehicleConfigvo,vc);
        configService.saveOrUpdate(vc);
    }
}
